<template>
    <div>
        <div>msg: {{msg}}</div>
        <el-button type="primary" @click="fn()">点击</el-button>
    </div>
</template>
<style scoped>

</style>
<script>
    export default{
        data(){
            return {
                msg: '第二个页面',
            }
        },
        components: {},
        methods: {
            fn: function () {
                var _that = this;
                this.$ajax.get('./mock/three.json').then(function (rsp) {
                    _that.$message({
                        message: '结果是：' + rsp.data.name,
                        type: 'success'
                    });
                    _that.msg = rsp.data.name;
                })
            }
        }
    }
</script>